<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>变量表达式</title>
</head>
<body>
<div>

    <!--获取对象的属性-->
    <div>
        <h3>获取对象的属性</h3>
        <table border="1">
            <tr>
                <td>ID</td>
                <td th:text="${userDto.userId}"></td>
            </tr>
            <tr>
                <td>用户名</td>
                <td th:text="${userDto.username}"></td>
            </tr>
            <tr>
                <td>姓名</td>
                <td th:text="${userDto.realName}"></td>
            </tr>
            <tr>
                <td>年龄</td>
                <td th:text="${userDto.age}"></td>
            </tr>
            <tr>
                <td>性别</td>
                <td th:text="${userDto.sex}"></td>
            </tr>
            <tr>
                <td>创建时间</td>
                <td th:text="${userDto.createTime}"></td>
            </tr>
        </table>
    </div>
    <br><br>

    <!--调用对象的方法-->
    <div>
        <h3>调用对象的方法</h3>
        <table border="1">
            <tr>
                <td>ID</td>
                <td th:text="${userDto.getUserId()}"></td>
            </tr>
            <tr>
                <td>用户名</td>
                <td th:text="${userDto.getUsername()}"></td>
            </tr>
            <tr>
                <td>姓名</td>
                <td th:text="${userDto.getRealName()}"></td>
            </tr>
            <tr>
                <td>年龄</td>
                <td th:text="${userDto.getAge()}"></td>
            </tr>
            <tr>
                <td>性别</td>
                <td th:text="${userDto.getSex()}"></td>
            </tr>
            <tr>
                <td>创建时间</td>
                <td th:text="${userDto.getCreateTime()}"></td>
            </tr>
            <tr>
                <td>JSON</td>
                <td th:text="${userDto.toString()}"></td>
            </tr>
        </table>
    </div>
    <br><br>

    <!--使用内置基本对象-->
    <div>
        <h3>使用内置基本对象</h3>
        <table border="1">
            <tr>
                <td>HttpServletRequest对象</td>
                <td th:text="${#request}"></td>
            </tr>
            <tr>
                <td>HttpServletResponse对象</td>
                <td th:text="${#response}"></td>
            </tr>
            <tr>
                <td>HttpSession对象</td>
                <td th:text="${#session}"></td>
            </tr>
            <tr>
                <td>ServletContext对象</td>
                <td th:text="${#servletContext}"></td>
            </tr>
            <tr>
                <td>上下文语言环境</td>
                <td th:text="${#locale}"></td>
            </tr>
            <tr>
                <td>上下文对象</td>
                <td th:text="${#ctx}"></td>
            </tr>
            <tr>
                <td>上下文变量</td>
                <td th:text="${#vars}"></td>
            </tr>
        </table>
    </div>
    <br><br>

    <!--使用内置工具对象-->
    <div>
        <h3>使用内置工具对象</h3>
        <table border="1">
            <tr>
                <td>strings</td>
                <td th:text="${#strings}"></td>
            </tr>
            <tr>
                <td>numbers</td>
                <td th:text="${#numbers}"></td>
            </tr>
            <tr>
                <td>bools</td>
                <td th:text="${#bools}"></td>
            </tr>
            <tr>
                <td>arrays</td>
                <td th:text="${#arrays}"></td>
            </tr>
            <tr>
                <td>lists</td>
                <td th:text="${#lists}"></td>
            </tr>
            <tr>
                <td>sets</td>
                <td th:text="${#sets}"></td>
            </tr>
            <tr>
                <td>maps</td>
                <td th:text="${#maps}"></td>
            </tr>
            <tr>
                <td>dates</td>
                <td th:text="${#dates}"></td>
            </tr>
        </table>
    </div>
    <br><br>

</div>
</body>
</html>